|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectga.core.goperators.ProbabilityOp
furny.ga.operators.RealMutationOp
public class RealMutationOp
The real mutation operator mutates genes randomly. Every single gene has a mutation chance given by the mutation probability.
| Field Summary | |
|---|---|
private int |
pNewFurniture
|
private int |
pRemoveFurniture
|
private int |
wID
|
private int |
wRotate
|
private int |
wTranslate
|
| Constructor Summary | |
|---|---|
RealMutationOp(int pMutate)
Creates the operator with the given mutation probability. |
|
RealMutationOp(int pMutate,
int pNewFurniture,
int pRemoveFurniture)
Creates the operator with the given mutation probability and given probabilities to add or remove furniture segments. |
|
RealMutationOp(int pMutate,
int wID,
int wTranslate,
int wRotate,
int pNewFurniture,
int pRemoveFurniture)
Creates the operator with the given mutation probability and given probabilities to add or remove furniture segments. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Main method for testing. |
FurnLayoutIndividual |
mutate(FurnLayoutIndividual individual,
GAContext context)
Performs a mutation (if probability met) of the given individual and returns the new individual. |
| Methods inherited from class ga.core.goperators.ProbabilityOp |
|---|
doOperate, doOperate, getRandom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final int pNewFurniture
private final int pRemoveFurniture
private int wID
private int wTranslate
private int wRotate
| Constructor Detail |
|---|
public RealMutationOp(int pMutate,
int wID,
int wTranslate,
int wRotate,
int pNewFurniture,
int pRemoveFurniture)
pMutate - Mutation probability.wID - ID mutation width.wTranslate - Translation mutation width.wRotate - Rotation mutation width.pNewFurniture - Probability to add a furniture segment.pRemoveFurniture - Probability to remove a furniture segment.
public RealMutationOp(int pMutate,
int pNewFurniture,
int pRemoveFurniture)
pMutate - Mutation probability.pNewFurniture - Probability to add a furniture segment.pRemoveFurniture - Probability to remove a furniture segment.public RealMutationOp(int pMutate)
pMutate - Mutation probability.| Method Detail |
|---|
public FurnLayoutIndividual mutate(FurnLayoutIndividual individual,
GAContext context)
IMutationOp
mutate in interface IMutationOp<FurnLayoutIndividual>individual - Individual to mutate.context - The GA context.
public static void main(java.lang.String[] args)
args - No arguments required.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||